import 'cache.dart';

class Profile {
  Profile({
      this.name, 
      this.version, 
      this.description, 
      this.isDark = false,
      this.locale,
      this.cache,});

  Profile.fromJson(dynamic json) {
    name = json['name'];
    version = json['version'];
    description = json['description'];
    isDark = json['isDark'] ?? false;
    locale = json['locale'];
    cache = json['cache'] != null ? Cache.fromJson(json['cache']) : null;
  }
  String? name;
  String? version;
  String? description;
  bool? isDark;
  String? locale;
  Cache? cache;

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['name'] = name;
    map['version'] = version;
    map['description'] = description;
    map['isDark'] = isDark;
    map['locale'] = locale;
    if (cache != null) {
      map['cache'] = cache?.toJson();
    }
    return map;
  }

}